package cn.ren.hai.base.service.impl;

import cn.ren.hai.core.entity.QueryPage;
import cn.ren.hai.base.entity.RhView;
import cn.ren.hai.base.mapper.RhViewMapper;
import cn.ren.hai.base.service.RhViewService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import cn.ren.hai.core.entity.PageInfo;
import cn.ren.hai.core.entity.QueryPage;


import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * 视图(RhView)表服务实现类
 *
 * @author makejava
 * @since 2022-01-23 02:01:52
 */
@Service("rhViewService")
public class RhViewServiceImpl extends ServiceImpl<RhViewMapper, RhView> implements RhViewService {

    private final RhViewMapper rhViewMapper;

    public RhViewServiceImpl(RhViewMapper rhViewMapper) {
        this.rhViewMapper = rhViewMapper;
    }

    @Override
    public PageInfo<RhView> list(QueryPage<RhView> page) {
        QueryWrapper<RhView> queryWrapper = new QueryWrapper<>();
        PageHelper.startPage(page);
        return new PageInfo<>(rhViewMapper.selectList(queryWrapper));
    }

}

